package com.mengjian.myspringai.config;

import com.mengjian.myspringai.mcpserver.OrderMcp;
import com.mengjian.myspringai.mcpserver.WeatherMcp;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xieren
 * created by 2025/7/7
 */
@Configuration
public class McpConfig {
    @Bean
    public ToolCallbackProvider WeatherTools(WeatherMcp weatherMcp) {
        return MethodToolCallbackProvider.builder()
                .toolObjects(weatherMcp)
                .build();
    }
    @Bean
    public ToolCallbackProvider OrderTools(OrderMcp orderMcp) {
        return MethodToolCallbackProvider.builder()
                .toolObjects(orderMcp)
                .build();
    }

}
